package cn.edu.neusoft.maxingxin231.yuejian06.Activity;

import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;

import com.squareup.picasso.Picasso;

import cn.edu.neusoft.maxingxin231.yuejian06.R;

public class MasterDetailActivity extends BaseActivity{
    String coach_id,coach_name,coach_img,coach_ismaster,club_id,att_num,coach_des;
    TextView tv_cname,tv_clubname,tv_like,tv_intro;
    ImageView img_master;
    ImageButton imgbtn_return,imgbtn_collect;
    @Override
    void initView() {
        setLayout_file(R.layout.activity_master_detail);
        imgbtn_return = (ImageButton)findViewById(R.id.imgbtn_return);
        imgbtn_collect = (ImageButton)findViewById(R.id.imgbtn_collect);
        tv_cname = (TextView)findViewById(R.id.tv_cname);
        tv_clubname = (TextView)findViewById(R.id.tv_clubname);
        tv_like = (TextView)findViewById(R.id.tv_like);
        tv_intro = (TextView)findViewById(R.id.tv_intro);
        img_master=(ImageView)findViewById(R.id.img_master);
        coach_id=getIntent().getStringExtra("coach_id");
        coach_name=getIntent().getStringExtra("coach_name");
        coach_img=getIntent().getStringExtra("coach_img");
        coach_ismaster=getIntent().getStringExtra("coach_ismaster");
        club_id=getIntent().getStringExtra("club_id");
        att_num=getIntent().getStringExtra("att_num");
        coach_des=getIntent().getStringExtra("coach_des");

        tv_cname.setText(coach_name);
        tv_clubname.setText(coach_des);
        tv_like.setText(att_num);
        tv_intro.setText(coach_ismaster);
        Picasso.with(MasterDetailActivity.this).load("http://10.0.2.2:80/yuejian14/public/static/coach/"+coach_img).into(img_master);
        showToast(coach_name);
    }

    @Override
    void initEvent() {
        imgbtn_return.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });

    }

    @Override
    void initData() {

    }

    @Override
    public void onPointerCaptureChanged(boolean hasCapture) {

    }
}
